-- ----------------------------
-- 数据库初始化
-- ----------------------------
-- ----------------------------
-- Table structure for ADDRESS
-- ----------------------------
/*DROP TABLE "SCMS_MS"."ADDRESS";*/
CREATE TABLE "SCMS_MS"."ADDRESS" (
                                   "A_ID" NUMBER(11,0)  NOT NULL,
                                   "NAME" NVARCHAR2(255)  NOT NULL,
                                   "TEL" NVARCHAR2(255)  NOT NULL,
                                   "AREA_CODE" NVARCHAR2(255)  NOT NULL,
                                   "ADDRESS" NVARCHAR2(255)  NOT NULL,
                                   "PROVINCE" NVARCHAR2(255)  NOT NULL,
                                   "CITY" NVARCHAR2(255)  NOT NULL,
                                   "COUNTY" NVARCHAR2(255)  NOT NULL,
                                   "U_ID" NUMBER(11,0) NOT NULL
)
    LOGGING
    NOCOMPRESS
    PCTFREE 10
    INITRANS 1
    STORAGE (
    BUFFER_POOL DEFAULT
            )
    PARALLEL 1
    NOCACHE
    DISABLE ROW MOVEMENT
;

-- ----------------------------
-- Records of ADDRESS
-- ----------------------------

-- ----------------------------
-- Table structure for CATEGORY
-- ----------------------------
/*DROP TABLE "SCMS_MS"."CATEGORY";*/
CREATE TABLE "SCMS_MS"."CATEGORY" (
                                    "C_ID" NUMBER(11,0)  NOT NULL,--菜品类别
                                    "CATEGORY_NAME" NVARCHAR2(15)  NOT NULL,--菜品类别名称
                                    "S_ID" NUMBER(11,0)  NOT NULL,--商家ID
                                    "STAT" NUMBER(11,0) --是否处于冻结状态
)
    LOGGING
    NOCOMPRESS
    PCTFREE 10
    INITRANS 1
    STORAGE (
    INITIAL 65536
    NEXT 1048576
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
            )
    PARALLEL 1
    NOCACHE
    DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "SCMS_MS"."CATEGORY"."STAT" IS '状态：1-正常 0-冻结';

-- ----------------------------
-- Records of CATEGORY
-- ----------------------------
INSERT INTO "SCMS_MS"."CATEGORY" VALUES ('1', '招牌炸鸡', '1', '1');
INSERT INTO "SCMS_MS"."CATEGORY" VALUES ('2', '主食 卷/堡', '1', '1');
INSERT INTO "SCMS_MS"."CATEGORY" VALUES ('3', '欢乐', '1', '1');
INSERT INTO "SCMS_MS"."CATEGORY" VALUES ('4', '单品汉堡', '2', '1');
INSERT INTO "SCMS_MS"."CATEGORY" VALUES ('5', '甜品小吃', '2', '1');
INSERT INTO "SCMS_MS"."CATEGORY" VALUES ('6', '饮品系列', '2', '1');
INSERT INTO "SCMS_MS"."CATEGORY" VALUES ('7', '现磨咖啡', '2', '1');
INSERT INTO "SCMS_MS"."CATEGORY" VALUES ('8', '饮品', '1', '1');
INSERT INTO "SCMS_MS"."CATEGORY" VALUES ('9', '特色主食', '3', '1');
INSERT INTO "SCMS_MS"."CATEGORY" VALUES ('10', '套餐', '3', '1');
INSERT INTO "SCMS_MS"."CATEGORY" VALUES ('11', '美味小食', '3', '1');
INSERT INTO "SCMS_MS"."CATEGORY" VALUES ('12', '精选配餐', '3', '1');
INSERT INTO "SCMS_MS"."CATEGORY" VALUES ('13', '甜点与饮料', '3', '1');
INSERT INTO "SCMS_MS"."CATEGORY" VALUES ('14', '冰淇淋与茶', '4', '1');
INSERT INTO "SCMS_MS"."CATEGORY" VALUES ('15', '奶茶&特饮', '4', '1');
INSERT INTO "SCMS_MS"."CATEGORY" VALUES ('16', '奶盖&原味茶', '4', '1');
INSERT INTO "SCMS_MS"."CATEGORY" VALUES ('17', '真果茶系列', '4', '1');
INSERT INTO "SCMS_MS"."CATEGORY" VALUES ('18', '牛肉汤', '6', '1');
INSERT INTO "SCMS_MS"."CATEGORY" VALUES ('19', '主食', '6', '1');
INSERT INTO "SCMS_MS"."CATEGORY" VALUES ('20', '火锅', '10', '1');
INSERT INTO "SCMS_MS"."CATEGORY" VALUES ('21', '炒饭', '7', '1');
INSERT INTO "SCMS_MS"."CATEGORY" VALUES ('22', '饮料', '7', '1');
INSERT INTO "SCMS_MS"."CATEGORY" VALUES ('40', '饮品', '9', '1');
INSERT INTO "SCMS_MS"."CATEGORY" VALUES ('41', '面包', '9', '1');
INSERT INTO "SCMS_MS"."CATEGORY" VALUES ('42', '粥类', '9', '1');
INSERT INTO "SCMS_MS"."CATEGORY" VALUES ('45', '蒸饭类', '14', '1');
INSERT INTO "SCMS_MS"."CATEGORY" VALUES ('46', '汤类', '14', '1');
INSERT INTO "SCMS_MS"."CATEGORY" VALUES ('47', '蒸饭类', '15', '1');
INSERT INTO "SCMS_MS"."CATEGORY" VALUES ('48', '汤蛊类', '15', '1');
INSERT INTO "SCMS_MS"."CATEGORY" VALUES ('49', '覆盖广泛广泛', '1', '1');
INSERT INTO "SCMS_MS"."CATEGORY" VALUES ('50', '分隔符分割分割', '1', '1');

-- ----------------------------
-- Table structure for COMMENTS
-- ----------------------------
/*DROP TABLE "SCMS_MS"."COMMENTS";*/
--评价表
CREATE TABLE "SCMS_MS"."COMMENTS" (
                                    "ID" NUMBER(20,0)  NOT NULL,--评价ID
                                    "CONTENT" NVARCHAR2(50) ,--评价内容
                                    "U_ID" NUMBER(11,0) ,--用户ID
                                    "S_ID" NUMBER(11,0) --商家ID
)
    LOGGING
    NOCOMPRESS
    PCTFREE 10
    INITRANS 1
    STORAGE (
    INITIAL 65536
    NEXT 1048576
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
            )
    PARALLEL 1
    NOCACHE
    DISABLE ROW MOVEMENT
;

-- ----------------------------
-- Records of COMMENTS
-- ----------------------------

-- ----------------------------
-- Table structure for DELIVERY
-- ----------------------------
/*DROP TABLE "SCMS_MS"."DELIVERY";*/
CREATE TABLE "SCMS_MS"."DELIVERY" (
                                    "D_ID" NUMBER(11,0)  NOT NULL,--骑手ID
                                    "NAME" NVARCHAR2(255) ,--骑手姓名
                                    "PHONE" NVARCHAR2(255) ,--骑手电话
                                    "TOTAL_NUM" NUMBER(11,0)  DEFAULT 0,--总接单数
                                    "AGE" NVARCHAR2(255) ,--年龄
                                    "STAT" NUMBER(11,0)  DEFAULT 1,
                                    "PASSWORD" VARCHAR2(255 BYTE) --密码
)
    LOGGING
    NOCOMPRESS
    PCTFREE 10
    INITRANS 1
    STORAGE (
    INITIAL 65536
    NEXT 1048576
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
            )
    PARALLEL 1
    NOCACHE
    DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "SCMS_MS"."DELIVERY"."D_ID" IS '主键';
COMMENT ON COLUMN "SCMS_MS"."DELIVERY"."NAME" IS '用户名';
COMMENT ON COLUMN "SCMS_MS"."DELIVERY"."PHONE" IS '电话';
COMMENT ON COLUMN "SCMS_MS"."DELIVERY"."TOTAL_NUM" IS '接单数量';
COMMENT ON COLUMN "SCMS_MS"."DELIVERY"."AGE" IS '年龄';
COMMENT ON COLUMN "SCMS_MS"."DELIVERY"."STAT" IS '评分';
COMMENT ON COLUMN "SCMS_MS"."DELIVERY"."PASSWORD" IS '密码';

-- ----------------------------
-- Records of DELIVERY
-- ----------------------------

-- ----------------------------
-- Table structure for GET_STAR
-- ----------------------------
/*DROP TABLE "SCMS_MS"."GET_STAR";*/
CREATE TABLE "SCMS_MS"."GET_STAR" (
                                    "ID" NUMBER(11,0)  NOT NULL,--评分ID
                                    "STAR" NUMBER(11,0) ,--评分
                                    "S_ID" NUMBER(11,0) --商家ID
)
    LOGGING
    NOCOMPRESS
    PCTFREE 10
    INITRANS 1
    STORAGE (
    INITIAL 65536
    NEXT 1048576
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
            )
    PARALLEL 1
    NOCACHE
    DISABLE ROW MOVEMENT
;

-- ----------------------------
-- Records of GET_STAR
-- ----------------------------
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('1', '3', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('2', '5', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('3', '5', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('4', '5', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('5', '5', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('6', '5', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('7', '5', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('8', '5', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('9', '5', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('10', '5', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('11', '5', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('12', '5', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('13', '5', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('14', '5', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('15', '5', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('16', '5', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('17', '5', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('18', '2', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('19', '4', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('20', '1', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('21', '1', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('22', '5', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('23', '4', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('24', '3', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('25', '2', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('26', '1', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('27', '1', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('28', '2', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('29', '3', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('30', '3', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('31', '4', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('32', '5', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('33', '3', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('34', '1', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('35', '2', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('36', '3', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('37', '4', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('38', '5', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('39', '1', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('40', '2', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('41', '3', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('42', '4', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('43', '5', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('44', '1', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('45', '2', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('46', '3', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('47', '4', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('48', '5', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('49', '4', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('50', '3', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('51', '2', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('52', '1', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('53', '1', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('54', '2', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('55', '1', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('56', '2', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('57', '3', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('58', '4', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('59', '1', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('60', '2', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('61', '3', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('62', '4', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('63', '5', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('64', '4', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('65', '3', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('66', '2', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('67', '1', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('68', '1', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('69', '5', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('70', '4', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('71', '3', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('72', '2', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('73', '1', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('74', '2', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('75', '3', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('76', '4', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('77', '5', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('78', '4', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('79', '5', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('80', '3', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('81', '5', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('82', '5', '1');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('83', '3', '10');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('84', '5', '10');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('85', '5', '10');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('86', '2', '10');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('87', '3', '10');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('88', '5', '10');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('89', '1', '10');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('90', '3', '4');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('91', '5', '4');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('92', '5', '4');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('93', '1', '4');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('94', '3', '9');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('95', '4', '9');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('96', '2', '9');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('97', '5', '9');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('98', '4', '9');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('99', '5', '9');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('100', '5', '9');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('101', '5', '3');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('102', '3', '9');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('103', '1', '9');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('104', '1', '9');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('105', '1', '9');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('106', '1', '9');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('107', '1', '9');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('108', '1', '9');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('109', '1', '9');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('110', '1', '9');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('111', '1', '9');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('112', '1', '9');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('200', '4', '6');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('201', '3', '6');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('203', '4', '3');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('204', '5', '102');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('202', '5', '4');
INSERT INTO "SCMS_MS"."GET_STAR" VALUES ('205', '4', '103');

-- ----------------------------
-- Table structure for GOOD
-- ----------------------------
--DROP TABLE "SCMS_MS"."GOOD";
CREATE TABLE "SCMS_MS"."GOOD" (
                                "G_ID" NUMBER(11,0)  NOT NULL,--菜品ID
                                "GOOD_NAME" NVARCHAR2(50)  NOT NULL,--菜品名称
                                "GOOD_PIC" NVARCHAR2(255) ,--菜品图片路径
                                "PRICE" NVARCHAR2(10)  NOT NULL,--菜品价格
                                "C_ID" NUMBER(11,0)  NOT NULL,
                                "SALES" NUMBER(11,0)  NOT NULL,--销量
                                "S_ID" NUMBER(11,0)  NOT NULL,--商家ID
                                "DESCRIPTION" NVARCHAR2(50) ,--菜品描述
                                "STAT" NUMBER(11,0) --菜品状态
)
    LOGGING
    NOCOMPRESS
    PCTFREE 10
    INITRANS 1
    STORAGE (
    INITIAL 65536
    NEXT 1048576
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
            )
    PARALLEL 1
    NOCACHE
    DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "SCMS_MS"."GOOD"."STAT" IS '状态：1-正常 0-冻结';

-- ----------------------------
-- Records of GOOD
-- ----------------------------
INSERT INTO "SCMS_MS"."GOOD" VALUES ('1', '炸年糕a', '/upload/t01208bd6d8dd578f15_20230920084457.jpg', '8', '2', '3', '1', '嘎嘎嘎', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('2', '墨西哥卷', '/upload/墨西哥卷.jpeg', '12', '2', '1', '1', '一口上瘾', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('3', '牛肉汉堡', '/upload/牛肉堡.jpg', '10', '2', '0', '1', '丰富多汁', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('4', '香辣鸡翅x', '/upload/香辣鸡翅.jpg', '8', '3', '3', '1', '香辣鸡翅', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('5', '双层红云热辣堡', '/upload/双层红云热辣堡.jpg', '10', '2', '0', '1', '双层享受', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('6', '烤翅', '/upload/烤翅.jpg', '8', '3', '3', '1', '香脆烤翅', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('7', '薯条', '/upload/薯条.jpg', '12', '3', '0', '1', '香脆薯条', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('8', '芝芝安格斯', '/upload/芝芝安格斯.png', '32', '4', '1', '2', '重度芝士爱好者', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('9', '大嘴安格斯', '/upload/大嘴安格斯.png', '40', '4', '2', '2', '满满肉感', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('10', '安格斯厚牛堡', '/upload/安格斯厚牛堡-原味-天椒.png', '38', '4', '0', '2', '独家秘制', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('11', '狠霸王鸡堡', '/upload/狠霸王鸡堡.png', '26', '4', '0', '2', '霸气鸡堡', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('12', '狠霸王牛堡', '/upload/狠霸王牛堡.png', '26', '4', '0', '2', '霸气牛堡', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('13', '狠霸王鱼堡', '/upload/狠霸王鱼堡.png', '26', '4', '0', '2', '霸气鱼堡', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('14', '薯霸王(中)', '/upload/薯霸王.png', '14', '5', '0', '2', '挑战3/8黄金切割', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('15', '王道川蜀鸡翅', '/upload/王道川蜀鸡翅.png', '13.5', '5', '0', '2', '椒麻鲜香', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('16', '王道椒香鸡腿', '/upload/王道椒香鸡腿.png', '13.5', '5', '0', '2', '香味四溢', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('17', '可口可乐', '/upload/可口可乐.png', '11', '6', '1', '2', '配直饮杯盖', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('18', '柠檬风味红茶', '/upload/柠檬风味红茶.png', '12', '6', '1', '2', '柠檬风味红茶', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('19', '卡布奇诺 (热)', '/upload/卡布奇诺 (热).png', '19', '7', '1', '2', '甄选咖啡', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('20', '美式 (热/冰)', '/upload/美式.png', '17', '7', '0', '2', '甄选咖啡', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('21', '牛奶', '/upload/牛奶.jpg', '5', '8', '8', '1', '鲜香牛奶', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('22', '密汁手扒鸡', '/upload/密汁手扒鸡.jpeg', '20', '1', '10', '1', '味道好极了', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('23', '炸鸡', '/upload/炸鸡.jpeg', '22', '1', '3', '1', '香脆美味', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('24', '脆鸡八分堡', '/upload/脆鸡八分堡.jpg', '12', '9', '6', '3', 'kfc-脆鸡八分堡', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('25', '劲脆鸡腿堡', '/upload/劲脆鸡腿堡.jpg', '12', '9', '3', '3', 'kfc-劲脆鸡腿堡', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('29', 'kfc-香辣鸡腿堡', '/upload/香辣鸡腿堡.jpg', '12', '9', '3', '3', 'kfc-香辣鸡腿堡', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('30', 'kfc-香辣鸡翅', '/upload/香辣鸡翅.jpg', '8', '11', '0', '3', 'kfc-香辣鸡翅', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('31', 'kfc-吮指原味鸡', '/upload/吮指原味鸡.jpg', '8', '11', '0', '3', 'kfc-吮指原味鸡', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('32', 'kfc-芙蓉荟萃汤', '/upload/芙蓉荟萃汤.jpg', '15', '12', '1', '3', 'kfc-芙蓉荟萃汤', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('33', 'kfc-菌菇四宝汤', '/upload/菌菇四宝汤.jpg', '15', '12', '1', '3', 'kfc-菌菇四宝汤', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('34', 'kfc-香甜玉米棒', '/upload/香甜玉米棒.jpg', '5', '12', '0', '3', 'kfc-香甜玉米棒', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('35', 'kfc-奥利奥花淇淋', '/upload/奥利奥花淇淋.jpg', '12', '13', '0', '3', 'kfc-奥利奥花淇淋', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('36', 'kfc-葡式蛋挞', '/upload/葡式蛋挞.jpg', '5', '13', '1', '3', 'kfc-葡式蛋挞', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('37', 'kfc-雪碧', '/upload/雪碧.png', '8', '13', '0', '3', 'kfc-雪碧', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('38', 'kfc-脆鸡八分堡套餐', '/upload/脆鸡八分堡套餐.jpg', '25', '10', '0', '3', 'kfc-脆鸡八分堡套', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('39', 'kfc-劲辣鸡腿堡套餐', '/upload/劲辣鸡腿堡套餐.jpg', '25', '10', '0', '3', 'kfc-劲辣鸡腿堡套', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('40', '奥利奥味雪王大圣代', '/upload/奥利奥味雪王大圣代.jpg', '6', '14', '6', '4', '蜜雪冰城-奥利奥味雪', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('41', '草莓味雪王大圣代', '/upload/草莓味雪王大圣代.jpg', '6', '14', '4', '4', '蜜雪冰城-草莓味雪王', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('42', '蓝莓味雪王大圣代', '/upload/蓝莓味雪王大圣代.jpg', '6', '14', '0', '4', '蓝莓味雪王大圣代', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('43', '棒打鲜橙', '/upload/棒打鲜橙.jpg', '7', '17', '1', '4', '蜜雪冰城-棒打鲜橙', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('44', '冰淇淋红茶', '/upload/冰淇淋红茶.jpg', '6', '14', '0', '4', '蜜雪冰城-冰淇淋红茶', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('45', '红豆奶茶', '/upload/红豆奶茶.jpg', '7', '15', '0', '4', '蜜雪冰城-红豆奶茶', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('46', '冰鲜柠檬水', '/upload/冰鲜柠檬水.jpg', '5', '17', '1', '4', '蜜雪冰城-冰鲜柠檬水', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('47', '吃土摇摇奶昔', '/upload/吃土摇摇奶昔.jpg', '7', '14', '1', '4', '蜜雪冰城-吃土摇摇奶', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('48', '黑糖珍珠奶茶', '/upload/黑糖珍珠奶茶.jpg', '7', '15', '0', '4', '蜜雪冰城-黑糖珍珠奶', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('49', '红茶', '/upload/红茶.jpg', '6', '16', '1', '4', '蜜雪冰城-红茶', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('50', '蓝莓摇摇奶昔', '/upload/蓝莓摇摇奶昔.jpg', '7', '14', '0', '4', '蜜雪冰城-蓝莓摇摇奶', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('51', '马来西亚白咖啡', '/upload/马来西亚白咖啡.jpg', '7', '16', '0', '4', '马来西亚白咖啡', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('52', '牛肉汤', '/upload/牛肉汤.jpg', '15', '18', '1', '6', '牛肉汤', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('53', '饼丝', '/upload/饼丝.jpg', '8', '19', '1', '6', '饼丝', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('54', '套餐一', '/upload/套餐一.jpeg', '89', '20', '0', '10', '鸳鸯锅', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('55', '鱼香肉丝', '/upload/鱼香肉丝.jpg', '15', '21', '0', '7', '好吃', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('56', '豆浆', '/upload/豆浆.jpeg', '3', '40', '1', '9', '好喝', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('57', '草莓奶油', '/upload/草莓奶油.jpeg', '16', '41', '1', '9', '新鲜草莓', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('58', '蜂蜜包', '/upload/蜂蜜包.jpeg', '8', '41', '0', '9', '酥脆可口', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('59', '玉米汁', '/upload/玉米汁.jpeg', '3', '40', '0', '9', '香甜可口', '1');
INSERT INTO "SCMS_MS"."GOOD" VALUES ('60', '奶黄包', '/upload/奶黄包.jpeg', '6', '41', '0', '9', '浓郁奶香', '1');

-- ----------------------------
-- Table structure for ORDER_GOOD
-- ----------------------------
--DROP TABLE "SCMS_MS"."ORDER_GOOD";
--订单明细表
CREATE TABLE "SCMS_MS"."ORDER_GOOD" (
                                      "ID" NUMBER(11,0)  NOT NULL,--订单明细ID
                                      "O_ID" NUMBER(11,0)  NOT NULL,--订单ID
                                      "G_ID" NUMBER(11,0)  NOT NULL,--菜品ID
                                      "COUNT" NUMBER(11,0)  NOT NULL--数量
)
    LOGGING
    NOCOMPRESS
    PCTFREE 10
    INITRANS 1
    STORAGE (
    INITIAL 65536
    NEXT 1048576
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
            )
    PARALLEL 1
    NOCACHE
    DISABLE ROW MOVEMENT
;

-- ----------------------------
-- Records of ORDER_GOOD
-- ----------------------------

-- ----------------------------
-- Table structure for RIDER_ORDER
-- ----------------------------
--DROP TABLE "SCMS_MS"."RIDER_ORDER";
CREATE TABLE "SCMS_MS"."RIDER_ORDER" (
                                       "R_O_ID" NUMBER(11,0)  NOT NULL,
                                       "U_ID" NUMBER(11,0)  NOT NULL,
                                       "O_ID" NUMBER(11,0)  NOT NULL
)
    LOGGING
    NOCOMPRESS
    PCTFREE 10
    INITRANS 1
    STORAGE (
    BUFFER_POOL DEFAULT
            )
    PARALLEL 1
    NOCACHE
    DISABLE ROW MOVEMENT
;

-- ----------------------------
-- Records of RIDER_ORDER
-- ----------------------------

-- ----------------------------
-- Table structure for ROLE
-- ----------------------------
--DROP TABLE "SCMS_MS"."ROLE";
CREATE TABLE "SCMS_MS"."ROLE" (
                                "R_ID" NUMBER(11,0)  NOT NULL,--角色ID
                                "ROLE_NAME" NVARCHAR2(10)  NOT NULL,--角色名称
                                "PERMS" NVARCHAR2(10)  NOT NULL
)
    LOGGING
    NOCOMPRESS
    PCTFREE 10
    INITRANS 1
    STORAGE (
    INITIAL 65536
    NEXT 1048576
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
            )
    PARALLEL 1
    NOCACHE
    DISABLE ROW MOVEMENT
;

-- ----------------------------
-- Records of ROLE
-- ----------------------------
INSERT INTO "SCMS_MS"."ROLE" VALUES ('1', 'user', 'user');
INSERT INTO "SCMS_MS"."ROLE" VALUES ('2', 'shop_owner', 'owner');
INSERT INTO "SCMS_MS"."ROLE" VALUES ('3', 'admin', 'admin');

-- ----------------------------
-- Table structure for SHOP
-- ----------------------------
--DROP TABLE "SCMS_MS"."SHOP";
CREATE TABLE "SCMS_MS"."SHOP" (
                                "S_ID" NUMBER(11,0)  NOT NULL,--商家ID
                                "LOGO_SRC" NVARCHAR2(255) ,--商家标志路径
                                "SHOP_NAME" NVARCHAR2(15)  NOT NULL,--商家名称
                                "U_ID" NUMBER(11,0)  NOT NULL,
                                "LICENSE" NVARCHAR2(10)  NOT NULL,--营业执照
                                "STAT" NUMBER(11,0)  NOT NULL,--状态
                                "DELIVERY_COST" NVARCHAR2(255) ,
                                "MIN_COST" NVARCHAR2(255) ,--最低消费
                                "TOTAL_SALES" NVARCHAR2(10)  NOT NULL,--总销售额
                                "PHONE" NVARCHAR2(15)  NOT NULL,--电话
                                "ADDRESS_DETAIL" NVARCHAR2(20)  NOT NULL,--地址
                                "DELIVERY_TIME" NVARCHAR2(255) ,
                                "DESCRIPTION" NVARCHAR2(50) 
)
    LOGGING
    NOCOMPRESS
    PCTFREE 10
    INITRANS 1
    STORAGE (
    INITIAL 65536
    NEXT 1048576
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
            )
    PARALLEL 1
    NOCACHE
    DISABLE ROW MOVEMENT
;

-- ----------------------------
-- Records of SHOP
-- ----------------------------
INSERT INTO "SCMS_MS"."SHOP" VALUES ('1', '/upload/华莱士_20230920085220.jfif', '华莱士zx', '1', '111112', '1', '4', '20', '654', '1234567891', '阳光路1号', '40', '她她她444');
INSERT INTO "SCMS_MS"."SHOP" VALUES ('2', '/upload/汉堡王.jfif', '汉堡王', '2', '222222', '1', '10', '10', '350', '1234567892', '阳光路2号', '40', '美味汉堡');
INSERT INTO "SCMS_MS"."SHOP" VALUES ('3', '/upload/KFCLogo.jpg', 'KFC', '3', '333333', '1', '5', '20', '452', '1234567893', '阳光路3号', '45', 'KFC');
INSERT INTO "SCMS_MS"."SHOP" VALUES ('4', '/upload/蜜雪冰城_20230920084641_20230920085246.jpg', '蜜雪冰城', '4', '444444', '1', '4.5', '15', '896', '1234567894', '阳光路4号s', '40', '冰淇淋与茶');
INSERT INTO "SCMS_MS"."SHOP" VALUES ('6', '/upload/f608d0b2f20e45d38acd31ffd6644bf5_20230920155800.jpg', '牛杂', '7', '555555', '1', '4', '4', '654', '1234567895', '阳光路5号', '40', '正宗牛肉汤');
INSERT INTO "SCMS_MS"."SHOP" VALUES ('7', '/upload/饭小灶.jpg', '饭小灶', '8', '666666', '1', '4', '4', '357', '1234567896', '阳光路6号', '4', '精品正餐');
INSERT INTO "SCMS_MS"."SHOP" VALUES ('10', '/upload/锅大侠.jpeg', '锅大侠', '11', '999999', '1', NULL, NULL, '951', '1234567899', '阳光路9号', NULL, '热销火锅');
INSERT INTO "SCMS_MS"."SHOP" VALUES ('11', '/upload/胖哥俩.jpeg', '胖哥俩', '12', '101010', '1', NULL, NULL, '354', '1234567890', '阳光路10号', NULL, '鸡翅煲');
INSERT INTO "SCMS_MS"."SHOP" VALUES ('8', '/upload/粉掌柜.jpg', '粉掌柜', '9', '777777', '1', NULL, NULL, '159', '1234567897', '阳光路7号', NULL, '米粉');
INSERT INTO "SCMS_MS"."SHOP" VALUES ('9', '/upload/阿熊面包.jpg', '阿熊面包', '10', '888888', '1', NULL, NULL, '790', '1234567898', '阳光路8号', NULL, '全类面包');

-- ----------------------------
-- Table structure for SHOP_MANAGER
-- ----------------------------
--DROP TABLE "SCMS_MS"."SHOP_MANAGER";
CREATE TABLE "SCMS_MS"."SHOP_MANAGER" (
                                        "S_M_ID" NUMBER(11,0)  NOT NULL,--店铺管理员ID
                                        "USER_NAME" NVARCHAR2(10)  NOT NULL,--店铺管理员用户名
                                        "PASSWORD" NVARCHAR2(10)  NOT NULL,--密码
                                        "PHONE" NVARCHAR2(15)  NOT NULL,--电话
                                        "IDENTITY_NUMBER" NVARCHAR2(20)  NOT NULL,--身份证号
                                        "NAME" NVARCHAR2(10)  NOT NULL,--姓名
                                        "STAT" NUMBER(11,0) ,--状态
                                        "R_ID" NUMBER(11,0)  NOT NULL--角色类别ID
)
    LOGGING
    NOCOMPRESS
    PCTFREE 10
    INITRANS 1
    STORAGE (
    INITIAL 65536
    NEXT 1048576
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
            )
    PARALLEL 1
    NOCACHE
    DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "SCMS_MS"."SHOP_MANAGER"."STAT" IS '状态：1-正常 0-冻结';

-- ----------------------------
-- Records of SHOP_MANAGER
-- ----------------------------
INSERT INTO "SCMS_MS"."SHOP_MANAGER" VALUES ('1', 'boss', '123', '1234567891', '410326200203193355', '小明', '1', '2');
INSERT INTO "SCMS_MS"."SHOP_MANAGER" VALUES ('2', 'boss1', '123', '1234567892', '410326200203193356', '小强', '1', '2');
INSERT INTO "SCMS_MS"."SHOP_MANAGER" VALUES ('3', 'boss2', '123', '1234567893', '410326200203193357', '小月', '1', '2');
INSERT INTO "SCMS_MS"."SHOP_MANAGER" VALUES ('4', 'boss3', '123', '1234567894', '410326326548512657', '小张', '1', '2');
INSERT INTO "SCMS_MS"."SHOP_MANAGER" VALUES ('7', 'boss4', '123', '1234567895', '410154214779845129', '小四', '1', '2');
INSERT INTO "SCMS_MS"."SHOP_MANAGER" VALUES ('8', 'boss5', '123', '1234567896', '410256483576543357', '小五', '1', '2');
INSERT INTO "SCMS_MS"."SHOP_MANAGER" VALUES ('9', 'boss6', '123', '1234567897', '410253169987193357', '小六', '1', '2');
INSERT INTO "SCMS_MS"."SHOP_MANAGER" VALUES ('10', 'boss7', '123', '1234567898', '410326200203163294', '小芸', '1', '2');
INSERT INTO "SCMS_MS"."SHOP_MANAGER" VALUES ('11', 'boss8', '123', '1234567899', '410326200147864357', '小军', '1', '2');
INSERT INTO "SCMS_MS"."SHOP_MANAGER" VALUES ('12', 'boss9', '123', '1234567890', '413496700203193357', '小丽', '1', '2');
INSERT INTO "SCMS_MS"."SHOP_MANAGER" VALUES ('13', '123', '123', '123', '123', '123', '1', '2');

-- ----------------------------
-- Table structure for T_ORDER
-- ----------------------------
--DROP TABLE "SCMS_MS"."T_ORDER";
CREATE TABLE "SCMS_MS"."T_ORDER" (
                                   "O_ID" NUMBER(11,0)  NOT NULL,--订单ID
                                   "ORDER_NUMBER" NVARCHAR2(30)  NOT NULL,--订单流水号
                                   "TOTAL_PRICE" NUMBER  NOT NULL,--总价
                                   "U_ID" NUMBER(11,0)  NOT NULL,--用户ID
                                   "S_ID" NUMBER(11,0)  NOT NULL,--商家ID
                                   "A_ID" NUMBER(11,0)  NOT NULL,--地址Id
                                   "CREATE_TIME" NVARCHAR2(30)  NOT NULL,--订单建立时间
                                   "ORDER_STAT" NUMBER(11,0)  DEFAULT 1 NOT NULL,--订单状态
                                   "GOOD_TOTAL_PRICE" NUMBER  NOT NULL,--菜品总价
                                   "DELIVERY_PRICE" NVARCHAR2(30)  NOT NULL,--配送费
                                   "D_ID" NUMBER(11,0) ,--骑手Id
                                   "ORDER_TIME" NVARCHAR2(30) ,--商家接单时间
                                   "PICK_TIME" NVARCHAR2(30) ,--骑手接单时间
                                   "ARRIVE_TIME" NVARCHAR2(30) --送达时间
)
    LOGGING
    NOCOMPRESS
    PCTFREE 10
    INITRANS 1
    STORAGE (
    INITIAL 65536
    NEXT 1048576
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
            )
    PARALLEL 1
    NOCACHE
    DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "SCMS_MS"."T_ORDER"."CREATE_TIME" IS '下单时间';
COMMENT ON COLUMN "SCMS_MS"."T_ORDER"."ORDER_TIME" IS '接单时间';
COMMENT ON COLUMN "SCMS_MS"."T_ORDER"."PICK_TIME" IS '取货时间';
COMMENT ON COLUMN "SCMS_MS"."T_ORDER"."ARRIVE_TIME" IS '送达时间';

-- ----------------------------
-- Records of T_ORDER
-- ----------------------------

-- ----------------------------
-- Table structure for T_USER
-- ----------------------------
--DROP TABLE "SCMS_MS"."T_USER";
CREATE TABLE "SCMS_MS"."T_USER" (
                                  "ID" NUMBER(11,0)  DEFAULT NULL NOT NULL,--用户ID
                                  "NAME" NVARCHAR2(10)  NOT NULL,--姓名
                                  "PHONE" NVARCHAR2(15)  NOT NULL,--电话
                                  "USERNAME" NVARCHAR2(10)  NOT NULL,--用户名
                                  "PASSWORD" NVARCHAR2(10)  NOT NULL,--密码
                                  "R_ID" NUMBER(11,0)  NOT NULL,--角色ID
                                  "PICSRC" NVARCHAR2(255) ,--照片路径
                                  "SCORE" NUMBER(11,0)  NOT NULL,--积分
                                  "STAT" NUMBER(11,0) --状态
)
    LOGGING
    NOCOMPRESS
    PCTFREE 10
    INITRANS 1
    STORAGE (
    INITIAL 65536
    NEXT 1048576
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
            )
    PARALLEL 1
    NOCACHE
    DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "SCMS_MS"."T_USER"."STAT" IS '状态：1-正常 0-冻结';

-- ----------------------------
-- Records of T_USER
-- ----------------------------
INSERT INTO "SCMS_MS"."T_USER" VALUES ('8', 'admin', '123456', 'admin', '123', '3', '/upload/大强.jpeg', '1', '1');
INSERT INTO "SCMS_MS"."T_USER" VALUES ('10', 'yyb', '123457', '小兰', '123', '1', '/upload/小兰_20230920085313.jpeg', '7', '1');
INSERT INTO "SCMS_MS"."T_USER" VALUES ('11', 'csy', '123458', '小白', '123', '1', '/upload/小白_20230920085322.jpeg', '19', '1');

-- ----------------------------
-- Sequence structure for ADDRESS_SEQ
-- ----------------------------
--DROP SEQUENCE "SCMS_MS"."ADDRESS_SEQ";
CREATE SEQUENCE "SCMS_MS"."ADDRESS_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20;

-- ----------------------------
-- Sequence structure for CATEGORY_SEQ
-- ----------------------------
--DROP SEQUENCE "SCMS_MS"."CATEGORY_SEQ";
CREATE SEQUENCE "SCMS_MS"."CATEGORY_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20;

-- ----------------------------
-- Sequence structure for COMMENTS_SEQ
-- ----------------------------
--DROP SEQUENCE "SCMS_MS"."COMMENTS_SEQ";
CREATE SEQUENCE "SCMS_MS"."COMMENTS_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20;

-- ----------------------------
-- Sequence structure for DELIVERY_SEQ
-- ----------------------------
--DROP SEQUENCE "SCMS_MS"."DELIVERY_SEQ";
CREATE SEQUENCE "SCMS_MS"."DELIVERY_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20;

-- ----------------------------
-- Sequence structure for GET_STAR_SEQ
-- ----------------------------
--DROP SEQUENCE "SCMS_MS"."GET_STAR_SEQ";
CREATE SEQUENCE "SCMS_MS"."GET_STAR_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20;

-- ----------------------------
-- Sequence structure for GOOD_SEQ
-- ----------------------------
--DROP SEQUENCE "SCMS_MS"."GOOD_SEQ";
CREATE SEQUENCE "SCMS_MS"."GOOD_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20;

-- ----------------------------
-- Sequence structure for ORDER_GOOD_SEQ
-- ----------------------------
--DROP SEQUENCE "SCMS_MS"."ORDER_GOOD_SEQ";
CREATE SEQUENCE "SCMS_MS"."ORDER_GOOD_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20;

-- ----------------------------
-- Sequence structure for RIDER_ORDER_SEQ
-- ----------------------------
--DROP SEQUENCE "SCMS_MS"."RIDER_ORDER_SEQ";
CREATE SEQUENCE "SCMS_MS"."RIDER_ORDER_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20;

-- ----------------------------
-- Sequence structure for ROLE_SEQ
-- ----------------------------
--DROP SEQUENCE "SCMS_MS"."ROLE_SEQ";
CREATE SEQUENCE "SCMS_MS"."ROLE_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20;

-- ----------------------------
-- Sequence structure for SHOP_MANAGER_SEQ
-- ----------------------------
--DROP SEQUENCE "SCMS_MS"."SHOP_MANAGER_SEQ";
CREATE SEQUENCE "SCMS_MS"."SHOP_MANAGER_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20;

-- ----------------------------
-- Sequence structure for SHOP_SEQ
-- ----------------------------
--DROP SEQUENCE "SCMS_MS"."SHOP_SEQ";
CREATE SEQUENCE "SCMS_MS"."SHOP_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20;

-- ----------------------------
-- Sequence structure for T_ORDER_SEQ
-- ----------------------------
--DROP SEQUENCE "SCMS_MS"."T_ORDER_SEQ";
CREATE SEQUENCE "SCMS_MS"."T_ORDER_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20;

-- ----------------------------
-- Sequence structure for T_USER_SEQ
-- ----------------------------
--DROP SEQUENCE "SCMS_MS"."T_USER_SEQ";
CREATE SEQUENCE "SCMS_MS"."T_USER_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20;

-- ----------------------------
-- Primary Key structure for table ADDRESS
-- ----------------------------
ALTER TABLE "SCMS_MS"."ADDRESS" ADD CONSTRAINT "SYS_C008480" PRIMARY KEY ("A_ID");

-- ----------------------------
-- Checks structure for table ADDRESS
-- ----------------------------
ALTER TABLE "SCMS_MS"."ADDRESS" ADD CONSTRAINT "SYS_C008471" CHECK ("A_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ADDRESS" ADD CONSTRAINT "SYS_C008472" CHECK ("NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ADDRESS" ADD CONSTRAINT "SYS_C008473" CHECK ("TEL" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ADDRESS" ADD CONSTRAINT "SYS_C008474" CHECK ("AREA_CODE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ADDRESS" ADD CONSTRAINT "SYS_C008475" CHECK ("ADDRESS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ADDRESS" ADD CONSTRAINT "SYS_C008476" CHECK ("PROVINCE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ADDRESS" ADD CONSTRAINT "SYS_C008477" CHECK ("CITY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ADDRESS" ADD CONSTRAINT "SYS_C008478" CHECK ("COUNTY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ADDRESS" ADD CONSTRAINT "SYS_C008479" CHECK ("U_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ADDRESS" ADD CONSTRAINT "SYS_C008555" CHECK ("A_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ADDRESS" ADD CONSTRAINT "SYS_C008556" CHECK ("NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ADDRESS" ADD CONSTRAINT "SYS_C008557" CHECK ("TEL" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ADDRESS" ADD CONSTRAINT "SYS_C008558" CHECK ("AREA_CODE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ADDRESS" ADD CONSTRAINT "SYS_C008559" CHECK ("ADDRESS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ADDRESS" ADD CONSTRAINT "SYS_C008560" CHECK ("PROVINCE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ADDRESS" ADD CONSTRAINT "SYS_C008561" CHECK ("CITY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ADDRESS" ADD CONSTRAINT "SYS_C008562" CHECK ("COUNTY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ADDRESS" ADD CONSTRAINT "SYS_C008563" CHECK ("U_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ADDRESS" ADD CONSTRAINT "SYS_C008746" CHECK ("A_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ADDRESS" ADD CONSTRAINT "SYS_C008747" CHECK ("NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ADDRESS" ADD CONSTRAINT "SYS_C008748" CHECK ("TEL" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ADDRESS" ADD CONSTRAINT "SYS_C008749" CHECK ("AREA_CODE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ADDRESS" ADD CONSTRAINT "SYS_C008750" CHECK ("ADDRESS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ADDRESS" ADD CONSTRAINT "SYS_C008751" CHECK ("PROVINCE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ADDRESS" ADD CONSTRAINT "SYS_C008752" CHECK ("CITY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ADDRESS" ADD CONSTRAINT "SYS_C008753" CHECK ("COUNTY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ADDRESS" ADD CONSTRAINT "SYS_C008754" CHECK ("U_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ADDRESS" ADD CONSTRAINT "SYS_C008979" CHECK ("A_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ADDRESS" ADD CONSTRAINT "SYS_C008980" CHECK ("NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ADDRESS" ADD CONSTRAINT "SYS_C008981" CHECK ("TEL" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ADDRESS" ADD CONSTRAINT "SYS_C008982" CHECK ("AREA_CODE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ADDRESS" ADD CONSTRAINT "SYS_C008983" CHECK ("ADDRESS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ADDRESS" ADD CONSTRAINT "SYS_C008984" CHECK ("PROVINCE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ADDRESS" ADD CONSTRAINT "SYS_C008985" CHECK ("CITY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ADDRESS" ADD CONSTRAINT "SYS_C008986" CHECK ("COUNTY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ADDRESS" ADD CONSTRAINT "SYS_C008987" CHECK ("U_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Triggers structure for table ADDRESS
-- ----------------------------
CREATE TRIGGER "SCMS_MS"."ADDRESS_TRIGGER" BEFORE INSERT ON "SCMS_MS"."ADDRESS" REFERENCING OLD AS "OLD" NEW AS "NEW" FOR EACH ROW WHEN (NEW.A_ID IS NULL)
BEGIN
    SELECT ADDRESS_SEQ.NEXTVAL INTO:NEW.A_ID FROM DUAL;
END;
/

-- ----------------------------
-- Primary Key structure for table CATEGORY
-- ----------------------------
ALTER TABLE "SCMS_MS"."CATEGORY" ADD CONSTRAINT "_COPY_12" PRIMARY KEY ("C_ID");

-- ----------------------------
-- Checks structure for table CATEGORY
-- ----------------------------
ALTER TABLE "SCMS_MS"."CATEGORY" ADD CONSTRAINT "SYS_C008481" CHECK ("C_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."CATEGORY" ADD CONSTRAINT "SYS_C008482" CHECK ("CATEGORY_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."CATEGORY" ADD CONSTRAINT "SYS_C008483" CHECK ("S_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."CATEGORY" ADD CONSTRAINT "SYS_C008564" CHECK ("C_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."CATEGORY" ADD CONSTRAINT "SYS_C008565" CHECK ("CATEGORY_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."CATEGORY" ADD CONSTRAINT "SYS_C008566" CHECK ("S_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."CATEGORY" ADD CONSTRAINT "SYS_C008755" CHECK ("C_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."CATEGORY" ADD CONSTRAINT "SYS_C008756" CHECK ("CATEGORY_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."CATEGORY" ADD CONSTRAINT "SYS_C008757" CHECK ("S_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."CATEGORY" ADD CONSTRAINT "SYS_C008988" CHECK ("C_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."CATEGORY" ADD CONSTRAINT "SYS_C008989" CHECK ("CATEGORY_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."CATEGORY" ADD CONSTRAINT "SYS_C008990" CHECK ("S_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Triggers structure for table CATEGORY
-- ----------------------------
CREATE TRIGGER "SCMS_MS"."CATEGORY_TRIGGER" BEFORE INSERT ON "SCMS_MS"."CATEGORY" REFERENCING OLD AS "OLD" NEW AS "NEW" FOR EACH ROW WHEN (NEW.C_ID IS NULL)
BEGIN
    SELECT CATEGORY_SEQ.NEXTVAL INTO:NEW.C_ID FROM DUAL;
END;
/

-- ----------------------------
-- Primary Key structure for table COMMENTS
-- ----------------------------
ALTER TABLE "SCMS_MS"."COMMENTS" ADD CONSTRAINT "_COPY_11" PRIMARY KEY ("ID");

-- ----------------------------
-- Checks structure for table COMMENTS
-- ----------------------------
ALTER TABLE "SCMS_MS"."COMMENTS" ADD CONSTRAINT "SYS_C008485" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."COMMENTS" ADD CONSTRAINT "SYS_C008567" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."COMMENTS" ADD CONSTRAINT "SYS_C008758" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."COMMENTS" ADD CONSTRAINT "SYS_C008991" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Triggers structure for table COMMENTS
-- ----------------------------
CREATE TRIGGER "SCMS_MS"."COMMENTS_TRIGGER" BEFORE INSERT ON "SCMS_MS"."COMMENTS" REFERENCING OLD AS "OLD" NEW AS "NEW" FOR EACH ROW WHEN (NEW.ID IS NULL)
BEGIN
    SELECT COMMENTS_SEQ.NEXTVAL INTO:NEW.ID FROM DUAL;
END;
/

-- ----------------------------
-- Primary Key structure for table DELIVERY
-- ----------------------------
ALTER TABLE "SCMS_MS"."DELIVERY" ADD CONSTRAINT "_COPY_10" PRIMARY KEY ("D_ID");

-- ----------------------------
-- Checks structure for table DELIVERY
-- ----------------------------
ALTER TABLE "SCMS_MS"."DELIVERY" ADD CONSTRAINT "SYS_C008487" CHECK ("D_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."DELIVERY" ADD CONSTRAINT "SYS_C008488" CHECK ("NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."DELIVERY" ADD CONSTRAINT "SYS_C008489" CHECK ("PHONE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."DELIVERY" ADD CONSTRAINT "SYS_C008491" CHECK ("AGE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Indexes structure for table DELIVERY
-- ----------------------------
CREATE UNIQUE INDEX "SCMS_MS"."PHONE"
    ON "SCMS_MS"."DELIVERY" ("PHONE" ASC)
    LOGGING
    
    PCTFREE 10
    INITRANS 2
    STORAGE (
    INITIAL 65536
    NEXT 1048576
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
    FLASH_CACHE DEFAULT
    )
    USABLE;

-- ----------------------------
-- Triggers structure for table DELIVERY
-- ----------------------------
CREATE TRIGGER "SCMS_MS"."DELIVERY_TRIGGER" BEFORE INSERT ON "SCMS_MS"."DELIVERY" REFERENCING OLD AS "OLD" NEW AS "NEW" FOR EACH ROW WHEN (NEW.D_ID IS NULL)
BEGIN
    SELECT DELIVERY_SEQ.NEXTVAL INTO:NEW.D_ID FROM DUAL;
END;
/

-- ----------------------------
-- Primary Key structure for table GET_STAR
-- ----------------------------
ALTER TABLE "SCMS_MS"."GET_STAR" ADD CONSTRAINT "_COPY_9" PRIMARY KEY ("ID");

-- ----------------------------
-- Checks structure for table GET_STAR
-- ----------------------------
ALTER TABLE "SCMS_MS"."GET_STAR" ADD CONSTRAINT "SYS_C008494" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."GET_STAR" ADD CONSTRAINT "SYS_C008574" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."GET_STAR" ADD CONSTRAINT "SYS_C008765" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."GET_STAR" ADD CONSTRAINT "SYS_C008998" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Triggers structure for table GET_STAR
-- ----------------------------
CREATE TRIGGER "SCMS_MS"."GET_STAR_TRIGGER" BEFORE INSERT ON "SCMS_MS"."GET_STAR" REFERENCING OLD AS "OLD" NEW AS "NEW" FOR EACH ROW WHEN (NEW.ID IS NULL)
BEGIN
    SELECT GET_STAR_SEQ.NEXTVAL INTO:NEW.ID FROM DUAL;
END;
/

-- ----------------------------
-- Primary Key structure for table GOOD
-- ----------------------------
ALTER TABLE "SCMS_MS"."GOOD" ADD CONSTRAINT "_COPY_8" PRIMARY KEY ("G_ID");

-- ----------------------------
-- Checks structure for table GOOD
-- ----------------------------
ALTER TABLE "SCMS_MS"."GOOD" ADD CONSTRAINT "SYS_C008496" CHECK ("G_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."GOOD" ADD CONSTRAINT "SYS_C008497" CHECK ("GOOD_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."GOOD" ADD CONSTRAINT "SYS_C008498" CHECK ("PRICE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."GOOD" ADD CONSTRAINT "SYS_C008499" CHECK ("C_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."GOOD" ADD CONSTRAINT "SYS_C008500" CHECK ("SALES" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."GOOD" ADD CONSTRAINT "SYS_C008501" CHECK ("S_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."GOOD" ADD CONSTRAINT "SYS_C008575" CHECK ("G_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."GOOD" ADD CONSTRAINT "SYS_C008576" CHECK ("GOOD_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."GOOD" ADD CONSTRAINT "SYS_C008577" CHECK ("PRICE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."GOOD" ADD CONSTRAINT "SYS_C008578" CHECK ("C_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."GOOD" ADD CONSTRAINT "SYS_C008579" CHECK ("SALES" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."GOOD" ADD CONSTRAINT "SYS_C008580" CHECK ("S_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."GOOD" ADD CONSTRAINT "SYS_C008766" CHECK ("G_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."GOOD" ADD CONSTRAINT "SYS_C008767" CHECK ("GOOD_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."GOOD" ADD CONSTRAINT "SYS_C008768" CHECK ("PRICE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."GOOD" ADD CONSTRAINT "SYS_C008769" CHECK ("C_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."GOOD" ADD CONSTRAINT "SYS_C008770" CHECK ("SALES" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."GOOD" ADD CONSTRAINT "SYS_C008771" CHECK ("S_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."GOOD" ADD CONSTRAINT "SYS_C008999" CHECK ("G_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."GOOD" ADD CONSTRAINT "SYS_C009000" CHECK ("GOOD_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."GOOD" ADD CONSTRAINT "SYS_C009001" CHECK ("PRICE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."GOOD" ADD CONSTRAINT "SYS_C009002" CHECK ("C_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."GOOD" ADD CONSTRAINT "SYS_C009003" CHECK ("SALES" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."GOOD" ADD CONSTRAINT "SYS_C009004" CHECK ("S_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Indexes structure for table GOOD
-- ----------------------------
CREATE UNIQUE INDEX "SCMS_MS"."GOODNAME"
    ON "SCMS_MS"."GOOD" ("GOOD_NAME" ASC)
    LOGGING
    
    PCTFREE 10
    INITRANS 2
    STORAGE (
    INITIAL 65536
    NEXT 1048576
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
    FLASH_CACHE DEFAULT
    )
    USABLE;

-- ----------------------------
-- Triggers structure for table GOOD
-- ----------------------------
CREATE TRIGGER "SCMS_MS"."GOOD_TRIGGER" BEFORE INSERT ON "SCMS_MS"."GOOD" REFERENCING OLD AS "OLD" NEW AS "NEW" FOR EACH ROW WHEN (NEW.G_ID IS NULL)
BEGIN
    SELECT GOOD_SEQ.NEXTVAL INTO:NEW.G_ID FROM DUAL;
END;
/

-- ----------------------------
-- Primary Key structure for table ORDER_GOOD
-- ----------------------------
ALTER TABLE "SCMS_MS"."ORDER_GOOD" ADD CONSTRAINT "_COPY_6" PRIMARY KEY ("ID");

-- ----------------------------
-- Checks structure for table ORDER_GOOD
-- ----------------------------
ALTER TABLE "SCMS_MS"."ORDER_GOOD" ADD CONSTRAINT "SYS_C008514" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ORDER_GOOD" ADD CONSTRAINT "SYS_C008515" CHECK ("O_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ORDER_GOOD" ADD CONSTRAINT "SYS_C008516" CHECK ("G_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ORDER_GOOD" ADD CONSTRAINT "SYS_C008517" CHECK ("COUNT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ORDER_GOOD" ADD CONSTRAINT "SYS_C008591" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ORDER_GOOD" ADD CONSTRAINT "SYS_C008592" CHECK ("O_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ORDER_GOOD" ADD CONSTRAINT "SYS_C008593" CHECK ("G_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ORDER_GOOD" ADD CONSTRAINT "SYS_C008594" CHECK ("COUNT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ORDER_GOOD" ADD CONSTRAINT "SYS_C008782" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ORDER_GOOD" ADD CONSTRAINT "SYS_C008783" CHECK ("O_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ORDER_GOOD" ADD CONSTRAINT "SYS_C008784" CHECK ("G_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ORDER_GOOD" ADD CONSTRAINT "SYS_C008785" CHECK ("COUNT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ORDER_GOOD" ADD CONSTRAINT "SYS_C009005" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ORDER_GOOD" ADD CONSTRAINT "SYS_C009006" CHECK ("O_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ORDER_GOOD" ADD CONSTRAINT "SYS_C009007" CHECK ("G_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ORDER_GOOD" ADD CONSTRAINT "SYS_C009008" CHECK ("COUNT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Triggers structure for table ORDER_GOOD
-- ----------------------------
CREATE TRIGGER "SCMS_MS"."ORDER_GOOD_TRIGGER" BEFORE INSERT ON "SCMS_MS"."ORDER_GOOD" REFERENCING OLD AS "OLD" NEW AS "NEW" FOR EACH ROW WHEN (NEW.ID IS NULL)
BEGIN
    SELECT ORDER_GOOD_SEQ.NEXTVAL INTO:NEW.ID FROM DUAL;
END;
/

-- ----------------------------
-- Primary Key structure for table RIDER_ORDER
-- ----------------------------
ALTER TABLE "SCMS_MS"."RIDER_ORDER" ADD CONSTRAINT "_COPY_5" PRIMARY KEY ("R_O_ID");

-- ----------------------------
-- Checks structure for table RIDER_ORDER
-- ----------------------------
ALTER TABLE "SCMS_MS"."RIDER_ORDER" ADD CONSTRAINT "SYS_C008519" CHECK ("R_O_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."RIDER_ORDER" ADD CONSTRAINT "SYS_C008520" CHECK ("U_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."RIDER_ORDER" ADD CONSTRAINT "SYS_C008521" CHECK ("O_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."RIDER_ORDER" ADD CONSTRAINT "SYS_C008595" CHECK ("R_O_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."RIDER_ORDER" ADD CONSTRAINT "SYS_C008596" CHECK ("U_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."RIDER_ORDER" ADD CONSTRAINT "SYS_C008597" CHECK ("O_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."RIDER_ORDER" ADD CONSTRAINT "SYS_C008786" CHECK ("R_O_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."RIDER_ORDER" ADD CONSTRAINT "SYS_C008787" CHECK ("U_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."RIDER_ORDER" ADD CONSTRAINT "SYS_C008788" CHECK ("O_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."RIDER_ORDER" ADD CONSTRAINT "SYS_C009009" CHECK ("R_O_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."RIDER_ORDER" ADD CONSTRAINT "SYS_C009010" CHECK ("U_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."RIDER_ORDER" ADD CONSTRAINT "SYS_C009011" CHECK ("O_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Triggers structure for table RIDER_ORDER
-- ----------------------------
CREATE TRIGGER "SCMS_MS"."RIDER_ORDER_TRIGGER" BEFORE INSERT ON "SCMS_MS"."RIDER_ORDER" REFERENCING OLD AS "OLD" NEW AS "NEW" FOR EACH ROW WHEN (NEW.R_O_ID IS NULL)
BEGIN
    SELECT RIDER_ORDER_SEQ.NEXTVAL INTO:NEW.R_O_ID FROM DUAL;
END;
/

-- ----------------------------
-- Primary Key structure for table ROLE
-- ----------------------------
ALTER TABLE "SCMS_MS"."ROLE" ADD CONSTRAINT "_COPY_4" PRIMARY KEY ("R_ID");

-- ----------------------------
-- Checks structure for table ROLE
-- ----------------------------
ALTER TABLE "SCMS_MS"."ROLE" ADD CONSTRAINT "SYS_C008523" CHECK ("R_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ROLE" ADD CONSTRAINT "SYS_C008524" CHECK ("ROLE_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ROLE" ADD CONSTRAINT "SYS_C008525" CHECK ("PERMS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ROLE" ADD CONSTRAINT "SYS_C008598" CHECK ("R_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ROLE" ADD CONSTRAINT "SYS_C008599" CHECK ("ROLE_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ROLE" ADD CONSTRAINT "SYS_C008600" CHECK ("PERMS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ROLE" ADD CONSTRAINT "SYS_C008789" CHECK ("R_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ROLE" ADD CONSTRAINT "SYS_C008790" CHECK ("ROLE_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ROLE" ADD CONSTRAINT "SYS_C008791" CHECK ("PERMS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ROLE" ADD CONSTRAINT "SYS_C009012" CHECK ("R_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ROLE" ADD CONSTRAINT "SYS_C009013" CHECK ("ROLE_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."ROLE" ADD CONSTRAINT "SYS_C009014" CHECK ("PERMS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Triggers structure for table ROLE
-- ----------------------------
CREATE TRIGGER "SCMS_MS"."ROLE_TRIGGER" BEFORE INSERT ON "SCMS_MS"."ROLE" REFERENCING OLD AS "OLD" NEW AS "NEW" FOR EACH ROW WHEN (NEW.R_ID IS NULL)
BEGIN
    SELECT ROLE_SEQ.NEXTVAL INTO:NEW.R_ID FROM DUAL;
END;
/

-- ----------------------------
-- Primary Key structure for table SHOP
-- ----------------------------
ALTER TABLE "SCMS_MS"."SHOP" ADD CONSTRAINT "_COPY_3" PRIMARY KEY ("S_ID");

-- ----------------------------
-- Checks structure for table SHOP
-- ----------------------------
ALTER TABLE "SCMS_MS"."SHOP" ADD CONSTRAINT "SYS_C008527" CHECK ("S_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP" ADD CONSTRAINT "SYS_C008529" CHECK ("SHOP_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP" ADD CONSTRAINT "SYS_C008530" CHECK ("U_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP" ADD CONSTRAINT "SYS_C008531" CHECK ("LICENSE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP" ADD CONSTRAINT "SYS_C008532" CHECK ("STAT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP" ADD CONSTRAINT "SYS_C008535" CHECK ("TOTAL_SALES" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP" ADD CONSTRAINT "SYS_C008536" CHECK ("PHONE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP" ADD CONSTRAINT "SYS_C008537" CHECK ("ADDRESS_DETAIL" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP" ADD CONSTRAINT "SYS_C008601" CHECK ("S_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP" ADD CONSTRAINT "SYS_C008602" CHECK ("LOGO_SRC" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP" ADD CONSTRAINT "SYS_C008603" CHECK ("SHOP_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP" ADD CONSTRAINT "SYS_C008604" CHECK ("U_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP" ADD CONSTRAINT "SYS_C008605" CHECK ("LICENSE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP" ADD CONSTRAINT "SYS_C008606" CHECK ("STAT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP" ADD CONSTRAINT "SYS_C008609" CHECK ("TOTAL_SALES" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP" ADD CONSTRAINT "SYS_C008610" CHECK ("PHONE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP" ADD CONSTRAINT "SYS_C008611" CHECK ("ADDRESS_DETAIL" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP" ADD CONSTRAINT "SYS_C008792" CHECK ("S_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP" ADD CONSTRAINT "SYS_C008794" CHECK ("SHOP_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP" ADD CONSTRAINT "SYS_C008795" CHECK ("U_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP" ADD CONSTRAINT "SYS_C008796" CHECK ("LICENSE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP" ADD CONSTRAINT "SYS_C008797" CHECK ("STAT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP" ADD CONSTRAINT "SYS_C008800" CHECK ("TOTAL_SALES" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP" ADD CONSTRAINT "SYS_C008801" CHECK ("PHONE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP" ADD CONSTRAINT "SYS_C008802" CHECK ("ADDRESS_DETAIL" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP" ADD CONSTRAINT "SYS_C009015" CHECK ("S_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP" ADD CONSTRAINT "SYS_C009016" CHECK ("SHOP_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP" ADD CONSTRAINT "SYS_C009017" CHECK ("U_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP" ADD CONSTRAINT "SYS_C009018" CHECK ("LICENSE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP" ADD CONSTRAINT "SYS_C009019" CHECK ("STAT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP" ADD CONSTRAINT "SYS_C009020" CHECK ("TOTAL_SALES" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP" ADD CONSTRAINT "SYS_C009021" CHECK ("PHONE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP" ADD CONSTRAINT "SYS_C009022" CHECK ("ADDRESS_DETAIL" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Indexes structure for table SHOP
-- ----------------------------
CREATE UNIQUE INDEX "SCMS_MS"."SHOPNAME"
    ON "SCMS_MS"."SHOP" ("SHOP_NAME" ASC)
    LOGGING
    
    PCTFREE 10
    INITRANS 2
    STORAGE (
    INITIAL 65536
    NEXT 1048576
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
    FLASH_CACHE DEFAULT
    )
    USABLE;

-- ----------------------------
-- Triggers structure for table SHOP
-- ----------------------------
CREATE TRIGGER "SCMS_MS"."SHOP_TRIGGER" BEFORE INSERT ON "SCMS_MS"."SHOP" REFERENCING OLD AS "OLD" NEW AS "NEW" FOR EACH ROW WHEN (NEW.S_ID IS NULL)
BEGIN
    SELECT SHOP_SEQ.NEXTVAL INTO:NEW.S_ID FROM DUAL;
END;
/

-- ----------------------------
-- Primary Key structure for table SHOP_MANAGER
-- ----------------------------
ALTER TABLE "SCMS_MS"."SHOP_MANAGER" ADD CONSTRAINT "_COPY_2" PRIMARY KEY ("S_M_ID");

-- ----------------------------
-- Checks structure for table SHOP_MANAGER
-- ----------------------------
ALTER TABLE "SCMS_MS"."SHOP_MANAGER" ADD CONSTRAINT "SYS_C008539" CHECK ("S_M_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP_MANAGER" ADD CONSTRAINT "SYS_C008540" CHECK ("USER_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP_MANAGER" ADD CONSTRAINT "SYS_C008541" CHECK ("PASSWORD" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP_MANAGER" ADD CONSTRAINT "SYS_C008542" CHECK ("PHONE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP_MANAGER" ADD CONSTRAINT "SYS_C008543" CHECK ("IDENTITY_NUMBER" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP_MANAGER" ADD CONSTRAINT "SYS_C008544" CHECK ("NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP_MANAGER" ADD CONSTRAINT "SYS_C008545" CHECK ("R_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP_MANAGER" ADD CONSTRAINT "SYS_C008612" CHECK ("S_M_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP_MANAGER" ADD CONSTRAINT "SYS_C008613" CHECK ("USER_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP_MANAGER" ADD CONSTRAINT "SYS_C008614" CHECK ("PASSWORD" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP_MANAGER" ADD CONSTRAINT "SYS_C008615" CHECK ("PHONE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP_MANAGER" ADD CONSTRAINT "SYS_C008616" CHECK ("IDENTITY_NUMBER" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP_MANAGER" ADD CONSTRAINT "SYS_C008617" CHECK ("NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP_MANAGER" ADD CONSTRAINT "SYS_C008618" CHECK ("R_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP_MANAGER" ADD CONSTRAINT "SYS_C008803" CHECK ("S_M_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP_MANAGER" ADD CONSTRAINT "SYS_C008804" CHECK ("USER_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP_MANAGER" ADD CONSTRAINT "SYS_C008805" CHECK ("PASSWORD" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP_MANAGER" ADD CONSTRAINT "SYS_C008806" CHECK ("PHONE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP_MANAGER" ADD CONSTRAINT "SYS_C008807" CHECK ("IDENTITY_NUMBER" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP_MANAGER" ADD CONSTRAINT "SYS_C008808" CHECK ("NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP_MANAGER" ADD CONSTRAINT "SYS_C008809" CHECK ("R_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP_MANAGER" ADD CONSTRAINT "SYS_C009023" CHECK ("S_M_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP_MANAGER" ADD CONSTRAINT "SYS_C009024" CHECK ("USER_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP_MANAGER" ADD CONSTRAINT "SYS_C009025" CHECK ("PASSWORD" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP_MANAGER" ADD CONSTRAINT "SYS_C009026" CHECK ("PHONE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP_MANAGER" ADD CONSTRAINT "SYS_C009027" CHECK ("IDENTITY_NUMBER" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP_MANAGER" ADD CONSTRAINT "SYS_C009028" CHECK ("NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."SHOP_MANAGER" ADD CONSTRAINT "SYS_C009029" CHECK ("R_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Indexes structure for table SHOP_MANAGER
-- ----------------------------
CREATE UNIQUE INDEX "SCMS_MS"."IDENTITY_NUMBER"
    ON "SCMS_MS"."SHOP_MANAGER" ("IDENTITY_NUMBER" ASC)
    LOGGING
    
    PCTFREE 10
    INITRANS 2
    STORAGE (
    INITIAL 65536
    NEXT 1048576
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
    FLASH_CACHE DEFAULT
    )
    USABLE;
CREATE UNIQUE INDEX "SCMS_MS"."PHONE_COPY_2"
    ON "SCMS_MS"."SHOP_MANAGER" ("PHONE" ASC)
    LOGGING
    
    PCTFREE 10
    INITRANS 2
    STORAGE (
    INITIAL 65536
    NEXT 1048576
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
    FLASH_CACHE DEFAULT
    )
    USABLE;
CREATE UNIQUE INDEX "SCMS_MS"."USERNAME"
    ON "SCMS_MS"."SHOP_MANAGER" ("USER_NAME" ASC)
    LOGGING
    
    PCTFREE 10
    INITRANS 2
    STORAGE (
    INITIAL 65536
    NEXT 1048576
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
    FLASH_CACHE DEFAULT
    )
    USABLE;

-- ----------------------------
-- Triggers structure for table SHOP_MANAGER
-- ----------------------------
CREATE TRIGGER "SCMS_MS"."SHOP_MANAGER_TRIGGER" BEFORE INSERT ON "SCMS_MS"."SHOP_MANAGER" REFERENCING OLD AS "OLD" NEW AS "NEW" FOR EACH ROW WHEN (NEW.S_M_ID IS NULL)
BEGIN
    SELECT SHOP_MANAGER_SEQ.NEXTVAL INTO:NEW.S_M_ID FROM DUAL;
END;
/

-- ----------------------------
-- Primary Key structure for table T_ORDER
-- ----------------------------
ALTER TABLE "SCMS_MS"."T_ORDER" ADD CONSTRAINT "_COPY_7" PRIMARY KEY ("O_ID");

-- ----------------------------
-- Checks structure for table T_ORDER
-- ----------------------------
ALTER TABLE "SCMS_MS"."T_ORDER" ADD CONSTRAINT "SYS_C008503" CHECK ("O_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_ORDER" ADD CONSTRAINT "SYS_C008504" CHECK ("ORDER_NUMBER" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_ORDER" ADD CONSTRAINT "SYS_C008505" CHECK ("TOTAL_PRICE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_ORDER" ADD CONSTRAINT "SYS_C008506" CHECK ("U_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_ORDER" ADD CONSTRAINT "SYS_C008507" CHECK ("S_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_ORDER" ADD CONSTRAINT "SYS_C008508" CHECK ("A_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_ORDER" ADD CONSTRAINT "SYS_C008509" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_ORDER" ADD CONSTRAINT "SYS_C008510" CHECK ("ORDER_STAT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_ORDER" ADD CONSTRAINT "SYS_C008511" CHECK ("GOOD_TOTAL_PRICE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_ORDER" ADD CONSTRAINT "SYS_C008512" CHECK ("DELIVERY_PRICE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_ORDER" ADD CONSTRAINT "SYS_C008581" CHECK ("O_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_ORDER" ADD CONSTRAINT "SYS_C008582" CHECK ("ORDER_NUMBER" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_ORDER" ADD CONSTRAINT "SYS_C008583" CHECK ("TOTAL_PRICE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_ORDER" ADD CONSTRAINT "SYS_C008584" CHECK ("U_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_ORDER" ADD CONSTRAINT "SYS_C008585" CHECK ("S_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_ORDER" ADD CONSTRAINT "SYS_C008586" CHECK ("A_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_ORDER" ADD CONSTRAINT "SYS_C008587" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_ORDER" ADD CONSTRAINT "SYS_C008588" CHECK ("ORDER_STAT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_ORDER" ADD CONSTRAINT "SYS_C008589" CHECK ("GOOD_TOTAL_PRICE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_ORDER" ADD CONSTRAINT "SYS_C008590" CHECK ("DELIVERY_PRICE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_ORDER" ADD CONSTRAINT "SYS_C008772" CHECK ("O_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_ORDER" ADD CONSTRAINT "SYS_C008773" CHECK ("ORDER_NUMBER" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_ORDER" ADD CONSTRAINT "SYS_C008774" CHECK ("TOTAL_PRICE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_ORDER" ADD CONSTRAINT "SYS_C008775" CHECK ("U_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_ORDER" ADD CONSTRAINT "SYS_C008776" CHECK ("S_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_ORDER" ADD CONSTRAINT "SYS_C008777" CHECK ("A_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_ORDER" ADD CONSTRAINT "SYS_C008778" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_ORDER" ADD CONSTRAINT "SYS_C008779" CHECK ("ORDER_STAT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_ORDER" ADD CONSTRAINT "SYS_C008780" CHECK ("GOOD_TOTAL_PRICE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_ORDER" ADD CONSTRAINT "SYS_C008781" CHECK ("DELIVERY_PRICE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_ORDER" ADD CONSTRAINT "SYS_C009030" CHECK ("O_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_ORDER" ADD CONSTRAINT "SYS_C009031" CHECK ("ORDER_NUMBER" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_ORDER" ADD CONSTRAINT "SYS_C009032" CHECK ("TOTAL_PRICE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_ORDER" ADD CONSTRAINT "SYS_C009033" CHECK ("U_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_ORDER" ADD CONSTRAINT "SYS_C009034" CHECK ("S_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_ORDER" ADD CONSTRAINT "SYS_C009035" CHECK ("A_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_ORDER" ADD CONSTRAINT "SYS_C009036" CHECK ("CREATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_ORDER" ADD CONSTRAINT "SYS_C009037" CHECK ("ORDER_STAT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_ORDER" ADD CONSTRAINT "SYS_C009038" CHECK ("GOOD_TOTAL_PRICE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_ORDER" ADD CONSTRAINT "SYS_C009039" CHECK ("DELIVERY_PRICE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Triggers structure for table T_ORDER
-- ----------------------------
CREATE TRIGGER "SCMS_MS"."T_ORDER_TRIGGER" BEFORE INSERT ON "SCMS_MS"."T_ORDER" REFERENCING OLD AS "OLD" NEW AS "NEW" FOR EACH ROW WHEN (NEW.O_ID IS NULL)
BEGIN
    SELECT T_ORDER_SEQ.NEXTVAL INTO:NEW.O_ID FROM DUAL;
END;
/

-- ----------------------------
-- Checks structure for table T_USER
-- ----------------------------
ALTER TABLE "SCMS_MS"."T_USER" ADD CONSTRAINT "SYS_C008972" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_USER" ADD CONSTRAINT "SYS_C008973" CHECK ("NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_USER" ADD CONSTRAINT "SYS_C008974" CHECK ("PHONE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_USER" ADD CONSTRAINT "SYS_C008975" CHECK ("USERNAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_USER" ADD CONSTRAINT "SYS_C008976" CHECK ("PASSWORD" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_USER" ADD CONSTRAINT "SYS_C008977" CHECK ("R_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_USER" ADD CONSTRAINT "SYS_C008978" CHECK ("SCORE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_USER" ADD CONSTRAINT "SYS_C009040" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_USER" ADD CONSTRAINT "SYS_C009041" CHECK ("NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_USER" ADD CONSTRAINT "SYS_C009042" CHECK ("PHONE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_USER" ADD CONSTRAINT "SYS_C009043" CHECK ("USERNAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_USER" ADD CONSTRAINT "SYS_C009044" CHECK ("PASSWORD" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_USER" ADD CONSTRAINT "SYS_C009045" CHECK ("R_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "SCMS_MS"."T_USER" ADD CONSTRAINT "SYS_C009046" CHECK ("SCORE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Triggers structure for table T_USER
-- ----------------------------
CREATE TRIGGER "SCMS_MS"."T_USER_TRIGGER" BEFORE INSERT ON "SCMS_MS"."T_USER" REFERENCING OLD AS "OLD" NEW AS "NEW" FOR EACH ROW WHEN (NEW.ID IS NULL)
BEGIN
    SELECT T_USER_SEQ.NEXTVAL INTO:NEW.ID FROM DUAL;
END;
/


